

SRCTREE=$(shell cd .. && pwd)

CFLAGS=-g -Wall -I. -I$(SRCTREE)/mgrfw/include -I$(SRCTREE)/osdep/include -I$(SRCTREE)/pfdep/include
LDFLAGS=

CMAPI_LIBS=$(SRCTREE)/obj/mgrfw/cmapi/libcmapi.a

# wlan cli test.
test_TARGET=cm_test
test_SRC=cm_test.c
test_OBJ=$(patsubst %.c,%.o,$(test_SRC))


TARGETS=$(test_TARGET)

.PHONY: all clean
all: $(TARGETS)


$(test_TARGET): $(test_OBJ) $(CMAPI_LIBS)
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $(test_TARGET)

$(obj)%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@



clean:
	rm -fr *.o *.a *.bak *~ $(TARGETS)
